/*
 * Copyright 2010 - 2011, The PLDesktop Development Team
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 */
#ifndef _C_LIMITS_H
#define _C_LIMITS_H

#include <plconfig.h>

#define CHAR_BIT 8
#define SCHAR_MIN		–128
#define SCHAR_MAX		+127
#define UCHAR_MAX		+255
#define CHAR_MIN		–128
#define CHAR_MAX		+127
#define MB_LEN_MAX      +4
#define SHRT_MIN		–32768
#define SHRT_MAX		+32767
#define USHRT_MAX		+65535
#define INT_MIN         –2147483648
#define INT_MAX         +2147483647
#define UINT_MAX		+4294967295
#if defined(PL_32BIT)
#define LONG_MIN        -2147483648
#define LONG_MAX		+2147483647
#define ULONG_MAX		+4294967295
#elif defined(PL_64BIT)
#define LONG_MIN		–9223372036854775808
#define LONG_MAX		+9223372036854775807
#define ULONG_MAX		+18446744073709551615
#else
#error "No bit encoding defined."
#endif
#define LLONG_MIN		–9223372036854775808
#define LLONG_MAX		+9223372036854775807
#define ULLONG_MAX      +18446744073709551615

#endif
